package com.hnas.common.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hnas.common.dao.VerifyCodeDAO;
import com.hnas.common.orm.VerifyCode;
import com.hnas.common.service.dto.DTOVerifyCode;
import com.hnas.common.service.dto.search.DTOVerifyCodeSearch;
import com.hnas.core.dto.DTOPagedList;

@Component("verifyCodeService")
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class VerifyCodeServiceImpl implements VerifyCodeService{

	@Autowired
	private VerifyCodeDAO verifyCodeDAO;
	
	@Override
	public VerifyCode saveOrUpdate(DTOVerifyCode dto) throws Exception {
		return this.verifyCodeDAO.saveOrUpdate(dto);
	}

	@Override
	public DTOPagedList<DTOVerifyCode> search(DTOVerifyCodeSearch criteria) {
		return this.verifyCodeDAO.search(criteria);
	}

}
